package common.model.knowledge;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * Created by Common on 7/31/16.
 */
/*
eg:
http://162.105.180.15:15984/_utils/document.html?kginstance/instance-100008
 */

@JsonIgnoreProperties({"revision"})
public class InstanceDoc extends BaseDoc {

    @JsonProperty("_id")
    private String id;

    @JsonProperty("_rev")
    private String revision;

    private String name;

    @JsonProperty("label")
    private String tag;

    private String url;

    public static class AbstractDoc {
        @JsonProperty("abstract-enwiki")
        private String abstract_enwiki;

        @JsonProperty("abstract-zhwiki")
        private String abstract_zhwiki;

        @JsonProperty("abstract_baidu")
        private String abstract_baidu;

        @JsonProperty("abstract-hudong")
        private String abstract_hudong;

        public String getAbstract_enwiki() {
            return abstract_enwiki;
        }

        public void setAbstract_enwiki(String abstract_enwiki) {
            this.abstract_enwiki = abstract_enwiki;
        }

        public String getAbstract_zhwiki() {
            return abstract_zhwiki;
        }

        public void setAbstract_zhwiki(String abstract_zhwiki) {
            this.abstract_zhwiki = abstract_zhwiki;
        }

        public String getAbstract_baidu() {
            return abstract_baidu;
        }

        public void setAbstract_baidu(String abstract_baidu) {
            this.abstract_baidu = abstract_baidu;
        }

        public String getAbstract_hudong() {
            return abstract_hudong;
        }

        public void setAbstract_hudong(String abstract_hudong) {
            this.abstract_hudong = abstract_hudong;
        }
    }

    private AbstractDoc abstracts;

    public static class ReferenceDoc {
        private String references_url_baidu;

        private String references_url_hudong;

        private String references_url_zhwiki;

        private String references_url_enwiki;

        public String getReferences_url_baidu() {
            return references_url_baidu;
        }

        public void setReferences_url_baidu(String references_url_baidu) {
            this.references_url_baidu = references_url_baidu;
        }

        public String getReferences_url_hudong() {
            return references_url_hudong;
        }

        public void setReferences_url_hudong(String references_url_hudong) {
            this.references_url_hudong = references_url_hudong;
        }

        public String getReferences_url_zhwiki() {
            return references_url_zhwiki;
        }

        public void setReferences_url_zhwiki(String references_url_zhwiki) {
            this.references_url_zhwiki = references_url_zhwiki;
        }

        public String getReferences_url_enwiki() {
            return references_url_enwiki;
        }

        public void setReferences_url_enwiki(String references_url_enwiki) {
            this.references_url_enwiki = references_url_enwiki;
        }
    }


    private ReferenceDoc references;


    private List<String> images_urls;

    private List<IDValuePair> types;

    private List<IDValuePair> related_classes;

    private List<IDValuePair> related_instances;


    public static class Infobox {
        private KeyValuePair row_key;

        private KeyValuePair row_value;

        public KeyValuePair getRow_key() {
            return row_key;
        }

        public void setRow_key(KeyValuePair row_key) {
            this.row_key = row_key;
        }

        public KeyValuePair getRow_value() {
            return row_value;
        }

        public void setRow_value(KeyValuePair row_value) {
            this.row_value = row_value;
        }
    }


    private List<Infobox> infobox;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRevision() {
        return revision;
    }

    public void setRevision(String revision) {
        this.revision = revision;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public AbstractDoc getAbstracts() {
        return abstracts;
    }

    public void setAbstracts(AbstractDoc abstracts) {
        this.abstracts = abstracts;
    }

    public ReferenceDoc getReferences() {
        return references;
    }

    public void setReferences(ReferenceDoc references) {
        this.references = references;
    }

    public List<String> getImages_urls() {
        return images_urls;
    }

    public void setImages_urls(List<String> images_urls) {
        this.images_urls = images_urls;
    }

    public List<IDValuePair> getTypes() {
        return types;
    }

    public void setTypes(List<IDValuePair> types) {
        this.types = types;
    }

    public List<IDValuePair> getRelated_classes() {
        return related_classes;
    }

    public void setRelated_classes(List<IDValuePair> related_classes) {
        this.related_classes = related_classes;
    }

    public List<IDValuePair> getRelated_instances() {
        return related_instances;
    }

    public void setRelated_instances(List<IDValuePair> related_instances) {
        this.related_instances = related_instances;
    }

    public List<Infobox> getInfobox() {
        return infobox;
    }

    public void setInfobox(List<Infobox> infobox) {
        this.infobox = infobox;
    }
}
